#ifndef calibrator_H
#define calibrator_H

#include <cv.h>
#include <highgui.h>

class Calibrator
{
private:
    int topLeftX;
    int topLeftY;
    int topRightX;
    int topRightY;
    int bottomLeftX;
    int bottomLeftY;
    int bottomRightX;
    int bottomRightY;

    int Hmin;
    int Hmax;
    int Smin;
    int Smax;
    int Vmin;
    int Vmax;

    CvCapture* capture;
    IplImage* calibrationImage;

private:
    void drawTarget(IplImage* img, const int x, const int y, const int radius) const;
    void printText(IplImage* img, const int x, const int y, const char* text) const;
    void setVideoStream (const char* videoStream, int cam_id);
    void calibrate(bool manual, const char* configFile);

public:
    Calibrator(const char* videoStream, const char* configFile, bool manual, int cam_id);
    ~Calibrator();
};


#endif

